<html>

    
<head>
         <link href="css/xom.css" rel="stylesheet" type="text/css">

<style type="text/css">
<!--
.cffree tr .cffree_td .not-required {
	font-size: medium;
}
.a {
	font-family: "Comic Sans MS", cursive;
	font-size: x-large;
	font-weight: bold;
	text-align: center;
}
.aa {
	font-weight: bold;
	color: #FFF;
}
.aaa {
	text-align: center;
}
.aaaa {
	text-align: right;
}
.aaaaa {
	text-align: right;
}
.aaaaa {
	text-align: center;
}
.aaaaaa {
	text-align: center;
}
.aa .aa {
	color: #FFF;
}
-->
</style>
    </head>

<body>
<script language="javascript" type="text/javascript" src="js/funciones.js"></script>
        
        <form name="form_empleado" method="post" action="free_process.php" onSubmit="return validate.check(this)">
<table width="1019">
                              <tr>
                                <td width="1011" height="72" class="a"><span class="aa">Factura</span></td>
    </tr>
                              <tr>
                                <td height="72"><table width="330" border="0">
                                  <tr>
                                    <td width="111"><span class="aa"><span class="aa">Numero Factura</span></span></td>
                                    <td width="209"><span class="aa">
                                    <input name="numeroFactura" type="text" class="btn"  id="numeroFactura" style="font-family:Georgia, 'Times New Roman', Times, serif;font-size:16px" />
                                    </span></td>
                                  </tr>
                                </table></td>
            </tr>
                              <tr>
                                <td height="20"><hr style="color: #0056b2;" /></td>
                              </tr>
                              <tr>
                                <td height="41"><table width="330" border="0">
                                  <tr>
                                    <td width="109"><span class="aa">Empleado</span></td>
                                    <td width="211"><span class="aa">
                                      <select name="empelado" type="text"  id="empleado" style="font-family:Georgia, 'Times New Roman', Times, serif;font-size:16px" >
                                        <option value="-1">Seleccione</option>
                                      </select>
                                    </span></td>
                                  </tr>
                                </table></td>
                              </tr>
                              <tr>
                                <td><hr style="color: #0056b2;" /></td>
                              </tr>
                              <tr>
                                <td><table width="1015" border="0">
                                  <tr>
                                    <td width="110" height="43"><span class="aa">Cliente</span></td>
                                    <td width="94"><span class="aa">
                                    <input name="Cliente" type="text" id="Cliente" size="15" maxlength="13" placeholder="Identidad"/>
                                    </span></td>
                                    <td width="32"><span class="aa">
                                    <input name="loading" type="image" src="images/loading.gif" width="30" height="30" />
                                    </span></td>
                                    <td width="304"><span class="aa">
                                    <input name="nombre" type="text" id="nombre" size="50" maxlength="50" placeholder="Nombre" />
                                    </span></td>
                                    <td width="453"><span class="aa">
                                    <input name="direccion" type="text" id="direccion" size="50" maxlength="50" placeholder="Direccion" />
                                    </span></td>
                                  </tr>
                                </table></td>
                              </tr>
                              <tr>
                                <td><hr style="color: #0056b2;" /></td>
                              </tr>
                              <tr>
                                <td height="59"><table width="391" border="0">
                                  <tr>
                                    <td width="111"><span class="aa">Tipo Pago</span></td>
                                    <td width="132"><span class="aa">
                                      <select name="empelado2" type="text"  id="empelado" style="font-family:Georgia, 'Times New Roman', Times, serif;font-size:16px" >
                                        <option value="-1">Seleccione</option>
                                      </select>
                                    </span></td>
                                    <td width="134"><span class="aa">
                                    <input name="Cliente2" type="date" id="Cliente2" size="15" maxlength="13" placeholder="Identidad"/>
                                    </span></td>
                                  </tr>
                                </table></td>
                              </tr>
                              <tr>
                                <td><hr style="color: #0056b2;" /></td>
                              </tr>
                              <tr>
                                <td><table width="1015" border="1" bgcolor="#003399" style="color:#FFF">
                                  <tr class="aaa">
                                    <td width="110"><span class="aa">Repuesto</span></td>
                                    <td width="95">Codigo</td>
                                    <td width="31">&nbsp;</td>
                                    <td width="305">Nombre Repuesto</td>
                                    <td width="92">Cantidad</td>
                                    <td width="135">Total</td>
                                  </tr>
                                </table>
                                  <div id="grid">
                                    
                                  </div>
                                  <span class="aa">
                                  <input type="button" name="agregarRepuesto" id="agregarRepuesto" value="Agregar" onclick="genera_tabla()"/>
                                </span></td>
                              </tr>
                              <tr>
                                <td><table width="330" border="0" align="right">
                                  <tr>
                                    <td width="111"><span class="aa">Sub total</span></td>
                                    <td width="209"><span class="aa">
                                      <input name="numeroFactura2" type="text" class="btn"  id="numeroFactura2" style="font-family:Georgia, 'Times New Roman', Times, serif;font-size:16px" />
                                    </span></td>
                                  </tr>
                                </table></td>
                              </tr>
                              <tr>
                                <td><table width="330" border="0" align="right">
                                  <tr>
                                    <td width="111"><span class="aa">ISV</span></td>
                                    <td width="209"><span class="aa">
                                      <input name="numeroFactura3" type="text" class="btn"  id="numeroFactura3" style="font-family:Georgia, 'Times New Roman', Times, serif;font-size:16px" />
                                    </span></td>
                                  </tr>
                                </table></td>
                              </tr>
                              <tr>
                                <td><table width="330" border="0" align="right">
                                  <tr>
                                    <td width="111"><span class="aa">Total</span></td>
                                    <td width="209"><span class="aa">
                                      <input name="numeroFactura4" type="text" class="btn"  id="numeroFactura4" style="font-family:Georgia, 'Times New Roman', Times, serif;font-size:16px" />
                                    </span></td>
                                  </tr>
                                </table></td>
                              </tr>
                              <tr>
                                <td><table width="330" border="0" align="right">
                                  <tr class="aaaaaa">
                                    <td width="264"><span class="aaaaa">
                                      <input type="submit" name="enviar" id="enviar" value="Facturar" />
                                    </span></td>
                                    <td width="56" class="aaaaa">&nbsp;</td>
                                  </tr>
                                </table></td>
                              </tr>
                              <tr>
                                <td>&nbsp;</td>
                              </tr>
                              <tr>
                                <td>&nbsp;</td>
                              </tr>
          </table>
</form>
                        
        
        <?php




?>

<script type="text/ecmascript">
function genera_tabla() {
  // Obtener la referencia del elemento body
  var body = document.getElementsByTagName("body")[0];
 
  // Crea un elemento <table> y un elemento <tbody>
  var tabla   = document.createElement("table");
  var tblBody = document.createElement("tbody");
 
  // Crea las celdas
  for (var i = 0; i < 1; i++) {
    // Crea las hileras de la tabla
    var hilera = document.createElement("tr");
 
   
      // Crea un elemento <td> y un nodo de texto, haz que el nodo de
      // texto sea el contenido de <td>, ubica el elemento <td> al final
      // de la hilera de la tabla
    
	   var celda = document.createElement("td");
	   celda.width="140";
		
       var campo= document.createElement("input");
	  campo.type="button";
	  campo.value="Buscar";
	  celda.appendChild(campo);
      hilera.appendChild(celda);
	  
	   var celda = document.createElement("td");
	   celda.width="122";
      var campo= document.createElement("input");
	    campo.placeholder="Codigo";
	  campo.type="text";
	  campo.size="13";
      celda.appendChild(campo);
      hilera.appendChild(celda);
	  
	  var celda = document.createElement("td");
	   celda.width="41";
      var campo= document.createElement("input");
	  campo.type="image";
	  campo.src="images/loading.gif";
	  campo.width="30";
	  campo.style.visibility="hidden";
	   campo.height="30";
      celda.appendChild(campo);
      hilera.appendChild(celda);
 
 
 var celda = document.createElement("td");
	   celda.width="387";
      var campo= document.createElement("input");
	
	  campo.type="text";
	  campo.size="50";
	   campo.maxlength="50" 
	   campo.readOnly="readOnly";
      celda.appendChild(campo);
      hilera.appendChild(celda);
	  
	   var celda = document.createElement("td");
	   celda.width="118";
      var campo= document.createElement("input");
	  campo.type="text";
	  campo.size="10";
	  
	   campo.maxlength="10" 
      celda.appendChild(campo);
      hilera.appendChild(celda);
	  
	     var celda = document.createElement("td");
	   celda.width="175";
      var campo= document.createElement("input");
	  campo.type="text";
	  campo.size="10";
	  campo.readOnly="readOnly";
	   campo.maxlength="10" 
      celda.appendChild(campo);
      hilera.appendChild(celda);
	  
	  
    // agrega la hilera al final de la tabla (al final del elemento tblbody)
    tblBody.appendChild(hilera);
  }
 
  // posiciona el <tbody> debajo del elemento <table>
  tabla.appendChild(tblBody);
  // appends <table> into <body>
  document.getElementById("grid").appendChild(tabla);
  // modifica el atributo "border" de la tabla y lo fija a "2";
  tabla.setAttribute("border", "2");
}

</script>
</body>
</html>